import Relay from "react-relay";
export default class UpdateUser extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { updateUser }`;
    }

    getVariables() {
        return {
            argsInput: {
                enterpriseId: this.props.enterpriseId,
                userId: this.props.userId,
                depId: this.props.depId,
                email: this.props.email,
                roEnId: this.props.roEnId,
                roleId: this.props.roleId,
                name:this.props.name,
                phone:this.props.phone,
                password:this.props.password
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on updateUserPayload {
            updateUser {
                errorCode
                value
                totalResult
                id
                token
                userModelList{
                    enId
                    name
                    uid
                }
                
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
            fragment on updateUserPayload {
                updateUser {
                    errorCode
                    value
                    totalResult
                    id
                    token
                    userModelList{
                        enId
                        name
                        uid
                    }
                    
            }
                }
            `]
        }];
    }

}

